<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{  /*权值 0  很容易被覆盖*/
				color: #5a7dd0 !important;
				background: #ffff00 !important;
			}
			div{/*权值 1 */
				color: #ff5500;
				background: #ffaa7f;
			}
			.d1{/*权值 10*/
				color: #ff007f;
				background: #aa00ff;
			}
			div.d1{/*选择器权值之和  权值*/
				color: #ff557f;
				background: #aaaa00;
			}
			body div.d1{/*权值 12*/
			font-size: 25px;
			color: #ff007f;
			background: #aa00ff;
			}
			#d1{/*权值 100*/
				font-size: 15px;
				color: #85447a;
				background: #4eb85a;
			}
			div#d1{/*权值 101*/
				font-size: 25px;
				color: #ff55ff;
				background: #55aaff;
			}
			div#d1:hover{/*权值 111*/
				color: #ffaaff;
				background: #55ffff;
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color:red;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint tenetur officiis ut amet quam a omnis dolorem ea fugit cupiditate totam quae ab quidem deleniti, fugiat voluptates iusto rem et!</div>
	</body>
</html>